import request from '@/utils/request'

export function getAllFaultInfo(pageNum) {
  return request({
    url: '/Turbine/get_fault_turbine',
    method: 'GET',
    params: { pageNum }
  })
}

export function getAllNonFaultInfo(pageNum) {
  return request({
    url: '/fault/getNonRepair',
    method: 'GET',
    params: { pageNum }
  })
}

export function getNoFaultInfo(faultId) {
  return request({
    url: '/fault/table/oneNo',
    method: 'POST',
    params: { faultId }
  })
}

export function addMaintain(data) {
  return request({
    url: '/maintenance/add',
    method: 'POST',
    data
  })
}

export function updateFaultManange(data) {
  return request({
    url: '/fault/update',
    method: 'POST',
    data
  })
}

export function updateOkFaultManange(data) {
  return request({
    url: '/fault/okupdate',
    method: 'POST',
    data
  })
}

export function getAllIngFaultInfo(pageNum) {
  return request({
    url: '/maintenance/list',
    method: 'GET',
    params: { pageNum }
  })
}

export function delMaintain(maintenanceTurbine) {
  return request({
    url: '/maintenance/delete',
    method: 'POST',
    params: { maintenanceTurbine }
  })
}

export function updateDevice(data) {
  return request({
    url: '/de_manage/editDevice',
    method: 'POST',
    data
  })
}
